package com.yao.koin.di

import com.yao.koin.api.GanRetrofitClient
import com.yao.koin.api.GanService
import com.yao.koin.repository.HomeRepository
import com.yao.koin.ui.ActivityViewModel
import org.koin.androidx.viewmodel.dsl.viewModel
import org.koin.dsl.module


/**
 * Created by luyao
 * on 2019/11/15 15:44
 */

val viewModelModule = module {
    viewModel { ActivityViewModel(get()) }

}

val repositoryModule = module {
    single { GanRetrofitClient.getService(GanService::class.java, GanService.BASE_URL) }
    single { HomeRepository() }

}

val appModule = listOf(viewModelModule, repositoryModule)